<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/8/17 0009
 * Time: 13:53
 * 考试题库代码表
 */
namespace Common\Model;
use Common\Model\CommonModel;
class TestDatabaseModel extends CommonModel{

    protected $_validate = array(
        //array(验证字段,验证规则,错误提示,验证条件,附加规则,验证时间)
        array('testdb_content', 'require', '考试题目不能为空！', 1, 'regex', CommonModel:: MODEL_BOTH  ),
        array('testdb_answer1', 'require', '备选答案A不能为空！', 1, 'regex', CommonModel:: MODEL_BOTH ),
        array('testdb_answer2', 'require', '备选答案B不能为空！', 1, 'regex', CommonModel:: MODEL_BOTH  ),
        array('testdb_right_answer', 'require', '正确答案不能为空！', 1, 'regex', CommonModel:: MODEL_BOTH  ),
    );
}